package com.base.cn.platform.os.controller.order.pay;

import com.base.cn.platform.os.common.constants.ConfigName;
import com.base.cn.platform.os.common.utils.result.ResultUtil;
import com.base.cn.platform.os.controller.cmmon.ApiBaseController;
import com.base.cn.platform.os.service.manage.config.SysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 支付类型接口Controller
 *
 * @author s.li
 * @create 2018-09-18-10:50
 */
@RestController
@RequestMapping("/api/order/pay")
public class ApiPaymentTypeController extends ApiBaseController {

    @Autowired
    private SysConfigService sysConfigService;

    /**
     * 获取支付类型
     * @return Map<String,Object>
     */
    @RequestMapping("/queryPayTypeList")
    public Map<String,Object> queryPayTypeList(){
        Map<String,String> configMap = sysConfigService.getSysConfigContext(ConfigName.PAY);
        return ResultUtil.SUCCESS(configMap);
    }
}
